1. Technical Field
This disclosure generally relates to data processing and computer databases, and more specifically relates to adaptive optimization of a computer database journal.
2. Background Art
Current databases may include many entries which may be modified many times by various applications. These databases system may employ journaling to provide redundancy in the database and to provide a means by which undesired modifications may be removed. Redundancy is useful in case of corrupted files or system failures. ‘Journaling’ refers to real-time (or near real time) logging of data-file updates or modifications to database files on a primary database system to be made on a target (or backup) database system. A journal is a data structure that stores each of the modifications tracked during journaling. Generally, such tracking is carried out from a start to an end point. Such start points may be a user specified point in time, an occurrence of a user specified action, a commit or transaction boundary, or at an object save point such as the creation of an object in a database. An end point for tracking database operations may be a user specified point in time, a user specified timestamp, a user specified sequence number, an end of a journal (wherein the journal reaches a maximum number of changes or a maximum size), an end to present changes, a commit or transaction boundary, and so on as will occur to readers of skill in the art. Journal replay refers to the use of the journal to reapply or remove, to the database, the modifications tracked in the journal. For example, a journal may be used to restore a database upon file corruption of one or more tables in the database by reapplying all modification tracked in the journal from the start to the end point. Alternatively, the journal may be used to roll-back a database, modification by modification, to remove one or more undesired changes to the database.
Due to the fact that journals are configured to store every single modification made between the start and endpoints, journals may become quite large in size. Further, to apply or remove each of these modifications during a journal replay may require a very large amount of processing and network resources. Optimizers have been developed to optimize the journal, however, the optimizer also uses significant resources.